<cfset BASE = CreateObject("component", "cfc.base") />
<cfset statusQueries = CreateObject("component", "cfc.statusQueries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
    "", <!---JS links--->
    "", <!---CSS links--->
    "Statistics", <!---Page Title--->
    "Stats" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->
    
    
    <cfif Session.strAuth EQ True>
    
        <h1 class="title">Statistics</h1>
        <div class="entry">
        
            Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.  
            The page details the Statistics of the Creation process.  
            <BR /> <BR />
            
            <cfset QUERIES.GetStepDetail = statusQueries.funcGetStepDetail() />
            
            <table align="center">
               <cfloop query="QUERIES.GetStepDetail">
                    <cfset Desc = StepDesc>
                    <cfset AppGroup = AppGroup>
                    <cfset PageUser = Page_UserDirect>
                    <cfset PageHome = Page_Home>
                    
                    <cfset QUERIES.GetSCFStepWaiting = statusQueries.funcGetSCFStepWaiting(QUERIES.GetStepDetail.ID) />
                    
                    <cfset RecordCount = QUERIES.GetSCFStepWaiting.recordcount>
                    <tr>
                        <td valign="top" colspan="3">
                            <span class="tableHeader">
                                <cfif (Session.strAuthType EQ #AppGroup# OR Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR)>
                                    <a href="#PageHome#">#Desc#</a> 
                                <cfelse>
                                    #Desc#
                                </cfif>                                        
                                (#RecordCount#)
                            </span>     
                        </td>
                    </tr>
                    <cfif RecordCount GT 0>
                        <cfloop query="QUERIES.GetSCFStepWaiting">   
                            <cfset Name =  Name>
                            <cfset ActionID = ID>
                    <tr>    
                        <td width="25">&nbsp;
                            
                        </td>               
                        <td>
                            <cfif (Session.strAuthType EQ #AppGroup# OR Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR) and PageUser NEQ ''>
                                <a href="#PageUser#?ID=#ActionID#">#Name#</a>
                            <cfelse>
                                #Name#
                            </cfif>
                        </td>
                    </tr>
                        </cfloop>
                    <cfelse>
                    <tr>   
                        <td width="25">&nbsp;
                            
                        </td>          
                        <td>
                            <span class="error">At the present time, there are not any employees staged for this step.</span>
                        </td>
                    </tr>
                    </cfif>
                    <tr>           
                        <td>&nbsp;
                            
                        </td>
                    </tr>
                </cfloop>
            </table>
            
        </div>
    
    <cfelse>
        <cfinclude template="Denied.cfm">
    </cfif>
    

<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>